import type { IAddupdateParams, IReqTrademarkList, IResTrademarkInfo } from '@/types/trademark'
import { http } from '@/utils/request'
/**
 * @description品牌列表
 * @param page 当前是第几页
 * @param limit 没有展示多少条数据
 */
export const reqTrademarkList = (page: number, limit: number) => {
  return http<IReqTrademarkList>(`/admin/product/baseTrademark/${page}/${limit}`, 'GET')
}
/**
 * @description 新增品牌
 * @param data
 */
export const reqAddTrademark = (data: IAddupdateParams) => {
  return http('/admin/product/baseTrademark/save', 'POST', data)
}
/**
 * @description删除品牌
 * @param id
 */
export const reqDelTrademark = (id: number) => {
  return http(`/admin/product/baseTrademark/remove/${id}`, 'DELETE')
}
/**
 * @description品牌详情
 * @param id
 */
export const reqTrademarkInfo = (id: number) => {
  return http<IResTrademarkInfo>(`/admin/product/baseTrademark/get/${id}`, 'GET')
}
/**
 * @description更新品牌
 * @param data
 */
export const reqUpdateTrademark = (data: IAddupdateParams) => {
  return http('/admin/product/baseTrademark/update', 'PUT', data)
}
export const reqAllTrademark = () => {
  return http<IResTrademarkInfo>('/admin/product/baseTrademark/getTrademarkList', 'GET')
}
